#include "Storage/ConfigurationCenter.hpp"
#include <cassert>

namespace Storage
{

ConfigurationCenter* ConfigurationCenter::pConfiguration_ = NULL;

// ---------------------------------------------------------------------------------------------------------------------

ConfigurationCenter& ConfigurationCenter::configCenter()
{
	assert( NULL != pConfiguration_);
	return *pConfiguration_;
}

// ---------------------------------------------------------------------------------------------------------------------

void ConfigurationCenter::setConfigCenter( ConfigurationCenter* pNewConfigCenter )
{
	assert( NULL == pConfiguration_);
	pConfiguration_ = pNewConfigCenter;
}

// ---------------------------------------------------------------------------------------------------------------------

ConfigurationCenter::ConfigurationCenter( ConnectionConfigCollection& connCfgColl, const std::string& profilePath )
	: rConnCfgCollection_( connCfgColl)
	, profilePath_( profilePath)
	, connectionsFilePath_( profilePath + "\\Connections.cfg")
{
}

// ---------------------------------------------------------------------------------------------------------------------

ConnectionConfigCollection& ConfigurationCenter::connCfgCollection()
{
	return rConnCfgCollection_;
}

// ---------------------------------------------------------------------------------------------------------------------


} // namespace Storage
